package com.tsll.controller;

import com.tsll.annotation.MyLog;
import com.tsll.service.ExpenditureService;

import com.tsll.vo.Result;
import com.tsll.vo.StaffVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/expenditure")
public class ExpenditureController {
    @Autowired
    private ExpenditureService expenditureService;
//    分页查询支出表
    @MyLog(businessName = "查询支出表")
    @RequestMapping("/select/{current}/{pageSize}")
    public Result list(@PathVariable Integer current, @PathVariable Integer pageSize,@RequestBody StaffVo staffVo){
        return expenditureService.findAll(current,pageSize,staffVo);
    }
    @MyLog(businessName = "删除支出信息")
    @RequestMapping("/delete/{id}")
    public  Result deleteList(@PathVariable Integer id){
        expenditureService.deleteList(id);
        return new Result(200,"删除出成功",null);
    }

}
